package com.yesep.learn.netty.protocol.common;

/**
 * @Description: 系统编码表（引用GB/T16706-1996）
 */
public enum SYS_TYPE {

	WATER("21", "地表水质量监测", ""), AIR("22", "空气质量监测", ""), SOUND("23", "声环境质量监测", ""), GROUNDWATER("24", "地下水质量监测", ""), SOIL("25", "土壤质量监测", ""), SEAWATER("26", "海水质量监测", ""), VOC("27", "挥发性有机物监测", ""), ATMOSPHERE("31", "大气环境污染源", ""), WATER_POLLUTION("32", "地表水体环境污染源", ""), GROUNDWATER_POLLUTION(
			"33", "地下水体环境污染源", ""), OCEAN_POLLUTION("34", "海洋环境污染源", ""), SOIL_POLLUTION("35", "土壤环境污染源", ""), SOUND_POLLUTION("36", "声环境污染源",
					""), VIBRATION_POLLUTION("37", "振动环境污染源", ""), RADIOACTIVITY_POLLUTION("38", "放射性环境污染源", ""), DUST_POLLUTION("39", "工地扬尘污染源", ""), ELECT_POLLUTION("41", "电磁环境污染源", ""), SMOKE("51", "烟气排放过程监控", ""), SEWAGE("52", "污水排放过程监控", ""), INTERACTIVE("91", "系统交互", " 用于现场机和上位机的交互");

	private String code;//编号
	private String message;//描述
	private String remark;//备注

	private SYS_TYPE(String code, String message, String remark) {
		this.code = code;
		this.message = message;
		this.remark = remark;
	}

	public String getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public String getRemark() {
		return remark;
	}

	@Override
	public String toString() {
		return this.name() + "(" + this.code + " | " + this.message + " | " + this.remark + ")";
	}

	public static SYS_TYPE get(String code) {
		for (SYS_TYPE e : SYS_TYPE.values()) {
			if (e.getCode().equals(code)) {
				return e;
			}
		}
		return null;
	}
}
